package com.mxpio.erp.plm.service.impl;


import com.mxpio.erp.common.enums.CommonEnums;
import com.mxpio.erp.common.enums.OrderStatusEnums;
import com.mxpio.erp.common.plm.entity.ProjectInfo;
import com.mxpio.erp.common.plm.entity.ProjectInfoCompleteDeliverableDraft;
import com.mxpio.erp.common.plm.entity.ProjectInfoEnd;
import com.mxpio.erp.common.plm.service.ProjectInfoCompleteDeliverableDraftService;
import com.mxpioframework.jpa.query.Criteria;
import com.mxpioframework.jpa.query.Operator;
import com.mxpioframework.system.service.impl.BaseServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.List;

@Service
public class ProjectInfoCompleteDeliverableDraftServiceImpl extends BaseServiceImpl<ProjectInfoCompleteDeliverableDraft> implements ProjectInfoCompleteDeliverableDraftService {
    @Override
    @Transactional
    public List<ProjectInfoCompleteDeliverableDraft> getOne(String bizNo) {
        List<ProjectInfoCompleteDeliverableDraft> bizNo1 = this.list(ProjectInfoCompleteDeliverableDraft.class, Criteria.create().addCriterion("bizNo", Operator.EQ, bizNo));

//        List<ProjectInfoCompleteDeliverableDraft> drafts = new ArrayList<>();
//        List<ProjectInfoCompleteDeliverableDraft> list = this.list(ProjectInfoCompleteDeliverableDraft.class, Criteria.create().addCriterion("proCode", Operator.EQ, proCode));
//        for (ProjectInfoCompleteDeliverableDraft draft : list){
//            if (draft.getIsAuditEnd().equals(CommonEnums.YesNo.NO.getCode())){
//                drafts.add(draft);
//            }
//        }
        return bizNo1;
    }
}
